/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



import java.awt.Dimension;
import javax.swing.JButton;

/**
 *
 * @author houfukude
 */
class RJButton extends JButton{
    RJButton rjb;
    public RJButton(String label){
        super(label);
        Dimension size=getPreferredSize();//获取按钮的最佳大小
        //调整按钮的大小,使之变成一个方形
        size.width=size.height=Math.min(size.width,size.height);
        setPreferredSize(size);
        //使jbutton不画背景,即不显示方形背景,而允许我们画一个圆的背景
        setContentAreaFilled(false);
    }
}
